import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/adminLogin',
    children: [
      /*主题住宿管理模块*/
      {
        path: '/admin/adminPage/AdminIndex',
        name: 'AdminIndex',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/AdminIndex'),
      },
      {
        path: '/admin/adminPage/SystemIndex',
        name: 'SystemIndex',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/SystemIndex'),
      },
      {
        path: '/admin/adminPage/SystemIndexAddNew',
        name: 'SystemIndexAddNew',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/SystemIndexAddNew'),
      },
      {
        path: '/admin/adminPage/SceneryAddNew',
        name: 'SceneryAddNew',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/SceneryAddNew'),
      },
      {
        path: '/admin/adminPage/SceneryListView',
        name: 'SceneryListView',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/SceneryListView'),
      },
      /*酒店管理模块*/
      {
        path: '/admin/adminPage/HotelAddNew',
        name: 'HotelAddNew',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/HotelAddNew'),
      },
      {
        path: '/admin/adminPage/HotelListView',
        name: 'HotelListView',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/HotelListView'),
      },
      {
        path: '/admin/adminPage/HotelScore',
        name: 'HotelScore',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/HotelScore'),
      },
      {
        path: '/admin/adminPage/HotelUserCommentListView',
        name: 'HotelUserCommentListView',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/HotelUserCommentListView'),
      },
      {
        path: '/admin/adminPage/HotelRoomInfoAddNew',
        name: 'HotelRoomInfoAddNew',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/HotelRoomInfoAddNew'),
      },
      {
        path: '/admin/adminPage/HotelRoomInfoListView',
        name: 'HotelRoomInfoListView',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/HotelRoomInfoListView'),
      },
      {
        path: '/admin/adminPage/HotelComplainingListView',
        name: 'HotelComplainingListView',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/HotelComplainingListView'),
      },
      //咨询页面后台
      {
        path: '/admin/adminPage/SecondaryBannerAddNew',
        name: 'SecondaryBannerAddNew',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/SecondaryBannerAddNew'),
      },
      {
        path: '/admin/adminPage/SecondaryBannerListView',
        name: 'SecondaryBannerListView',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/SecondaryBannerListView'),
      },
      {
        path: '/admin/adminPage/SecondaryConsultAddNew',
        name: 'SecondaryConsultAddNew',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/SecondaryConsultAddNew'),
      },
      {
        path: '/admin/adminPage/SecondaryConsultListView',
        name: 'SecondaryConsultListView',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/SecondaryConsultListView'),
      },
      /*用户管理模块*/
      {
        path: '/admin/adminPage/UserAddNew',
        name: 'UserAddNew',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/UserAddNew'),
      },
      {
        path: '/admin/adminPage/UserListView',
        name: 'UserListView',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/UserListView'),
      },
      /*订单管理模块*/
      {
        path: '/admin/adminPage/OrdersListView',
        name: 'OrdersListView',
        component: () => import(/* webpackChunkName: "about" */ '../views/admin/adminPage/OrdersListView'),
      }
    ]
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')

  },
  {
    path: '/adminLogin',
    name: 'adminLogin',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/adminLogin')

  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
